﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using Viki_Bll;
using Viki_IBll;

namespace Viki_BllFactory
{
    public static class DataAccess
    {
        private static readonly string path = "Viki_Bll";

       

        public static Viki_IBll.IUserService CreateUserService()
        {
            string className = path + ".UserService";
            Assembly a = Assembly.Load(path);
            Viki_IBll.IUserService ins = (Viki_IBll.IUserService)a.CreateInstance(className);

            return ins;
        }
        public static Viki_IBll.IRegisterService CreateRegisterService()
        {
            string className = path + ".RegisterService";
            Assembly a = Assembly.Load(path);
            Viki_IBll.IRegisterService ins = (Viki_IBll.IRegisterService)a.CreateInstance(className);

            return ins;
        }
        public static Viki_IBll.ITeacherService CreateTeacherService()
        {
            string className = path + ".TeacherService";
            Assembly a = Assembly.Load(path);
            Viki_IBll.ITeacherService ins = (Viki_IBll.ITeacherService)a.CreateInstance(className);

            return ins;
        }
    }
}
